package split;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Test1 {
	public static void main(String[] args) {
		String rex1 = "\\>\\d+(\\.\\d*)?";// \\>\\d+(\\.\\d*)?
		String arr1 = "好>18.9> " + "\r\n" + "    好这种>+9";
		 Match(rex1,arr1);
	}

	public static void replaceEmpty() {
		String rex2 = "\\s+";
		String empty = "我        是 好人                  ";
		empty = empty.replaceAll(rex2, "");
		System.out.println(empty.trim());
	}

	public static void Match(String rex, String arr) {
		Pattern p = Pattern.compile(rex);
		Matcher m = p.matcher(arr);
		boolean isfind = m.find();
		while (isfind) {
			String x = m.group();
			System.out.println(x);
			isfind = m.find();
		}
	}
}
